package com.atguigu.tingshu.album.mapper;

import com.atguigu.tingshu.enums.TrackStatType;
import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.AlbumTrackListVo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TrackInfoMapper extends BaseMapper<TrackInfo> {

    /**
     * @param @param         trackListVoPage
     * @param trackInfoQuery
     * @param trackStatTypes
     * @return @return {@code Page<TrackListVo> }
     * @name findUserTrackPage
     * @description 查询用户声音分页
     */
    Page<TrackListVo> findUserTrackPage(Page<TrackListVo> trackListVoPage,
                                        @Param("trackInfoQuery") TrackInfoQuery trackInfoQuery,
                                        @Param("trackStatTypes") List<TrackStatType> trackStatTypes);

    /**
     * 查询专辑声音分页列表
     *
     * @param albumTrackListVoPage 分页对象
     * @param albumId              专辑ID
     * @param trackStatTypes       统计类型列表
     * @return 分页结果
     */
    Page<AlbumTrackListVo> findAlbumTrackPage(Page<AlbumTrackListVo> albumTrackListVoPage,
                                              @Param("albumId") Long albumId,
                                              @Param("trackStatTypes") List<TrackStatType> trackStatTypes);
}
